package com.hotel.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.hotel.dao.LiveinMapper;
import com.hotel.entity.Livein;
import com.hotel.service.LiveinService;

@Service("liveinService")
@Transactional(transactionManager="txManager")
public class LiveinServiceImpl implements LiveinService {

	@Resource
	private LiveinMapper liveinMapper;
	
	@Override
	public int insert(Livein record) {
		return liveinMapper.insert(record);
	}

	@Override
	public List<Livein> findAllLiveins(Integer pageNo, Integer pageSize) {
		return liveinMapper.findAllLiveins((pageNo-1)*pageSize, pageSize);
	}

}
